#ifndef HIDL_GENERATED_ANDROID_HARDWARE_GRAPHICS_MAPPER_V4_0_BPHWMAPPER_H
#define HIDL_GENERATED_ANDROID_HARDWARE_GRAPHICS_MAPPER_V4_0_BPHWMAPPER_H

#include <hidl/HidlTransportSupport.h>

#include <android/hardware/graphics/mapper/4.0/IHwMapper.h>

namespace OHOS {
namespace android {
namespace hardware {
namespace graphics {
namespace mapper {
namespace V4_0 {

struct BpHwMapper : public ::OHOS::android::hardware::BpInterface<IMapper>, public ::OHOS::android::hardware::details::HidlInstrumentor {
    explicit BpHwMapper(const ::OHOS::android::sp<::OHOS::android::hardware::IBinder> &_hidl_impl);

    /**
     * The pure class is what this class wraps.
     */
    typedef IMapper Pure;

    /**
     * Type tag for use in template logic that indicates this is a 'proxy' class.
     */
    typedef ::OHOS::android::hardware::details::bphw_tag _hidl_tag;

    virtual bool isRemote() const override { return true; }

    void onLastStrongRef(const void* id) override;

    // Methods from ::OHOS::android::hardware::graphics::mapper::V4_0::IMapper follow.
    static ::OHOS::android::hardware::Return<void>  _hidl_createDescriptor(::OHOS::android::hardware::IInterface* _hidl_this, ::OHOS::android::hardware::details::HidlInstrumentor *_hidl_this_instrumentor, const ::OHOS::android::hardware::graphics::mapper::V4_0::IMapper::BufferDescriptorInfo& description, createDescriptor_cb _hidl_cb);
    static ::OHOS::android::hardware::Return<void>  _hidl_importBuffer(::OHOS::android::hardware::IInterface* _hidl_this, ::OHOS::android::hardware::details::HidlInstrumentor *_hidl_this_instrumentor, const ::OHOS::android::hardware::hidl_handle& rawHandle, importBuffer_cb _hidl_cb);
    static ::OHOS::android::hardware::Return<::OHOS::android::hardware::graphics::mapper::V4_0::Error>  _hidl_freeBuffer(::OHOS::android::hardware::IInterface* _hidl_this, ::OHOS::android::hardware::details::HidlInstrumentor *_hidl_this_instrumentor, void* buffer);
    static ::OHOS::android::hardware::Return<::OHOS::android::hardware::graphics::mapper::V4_0::Error>  _hidl_validateBufferSize(::OHOS::android::hardware::IInterface* _hidl_this, ::OHOS::android::hardware::details::HidlInstrumentor *_hidl_this_instrumentor, void* buffer, const ::OHOS::android::hardware::graphics::mapper::V4_0::IMapper::BufferDescriptorInfo& description, uint32_t stride);
    static ::OHOS::android::hardware::Return<void>  _hidl_getTransportSize(::OHOS::android::hardware::IInterface* _hidl_this, ::OHOS::android::hardware::details::HidlInstrumentor *_hidl_this_instrumentor, void* buffer, getTransportSize_cb _hidl_cb);
    static ::OHOS::android::hardware::Return<void>  _hidl_lock(::OHOS::android::hardware::IInterface* _hidl_this, ::OHOS::android::hardware::details::HidlInstrumentor *_hidl_this_instrumentor, void* buffer, uint64_t cpuUsage, const ::OHOS::android::hardware::graphics::mapper::V4_0::IMapper::Rect& accessRegion, const ::OHOS::android::hardware::hidl_handle& acquireFence, lock_cb _hidl_cb);
    static ::OHOS::android::hardware::Return<void>  _hidl_unlock(::OHOS::android::hardware::IInterface* _hidl_this, ::OHOS::android::hardware::details::HidlInstrumentor *_hidl_this_instrumentor, void* buffer, unlock_cb _hidl_cb);
    static ::OHOS::android::hardware::Return<void>  _hidl_flushLockedBuffer(::OHOS::android::hardware::IInterface* _hidl_this, ::OHOS::android::hardware::details::HidlInstrumentor *_hidl_this_instrumentor, void* buffer, flushLockedBuffer_cb _hidl_cb);
    static ::OHOS::android::hardware::Return<::OHOS::android::hardware::graphics::mapper::V4_0::Error>  _hidl_rereadLockedBuffer(::OHOS::android::hardware::IInterface* _hidl_this, ::OHOS::android::hardware::details::HidlInstrumentor *_hidl_this_instrumentor, void* buffer);
    static ::OHOS::android::hardware::Return<void>  _hidl_isSupported(::OHOS::android::hardware::IInterface* _hidl_this, ::OHOS::android::hardware::details::HidlInstrumentor *_hidl_this_instrumentor, const ::OHOS::android::hardware::graphics::mapper::V4_0::IMapper::BufferDescriptorInfo& description, isSupported_cb _hidl_cb);
    static ::OHOS::android::hardware::Return<void>  _hidl_get(::OHOS::android::hardware::IInterface* _hidl_this, ::OHOS::android::hardware::details::HidlInstrumentor *_hidl_this_instrumentor, void* buffer, const ::OHOS::android::hardware::graphics::mapper::V4_0::IMapper::MetadataType& metadataType, get_cb _hidl_cb);
    static ::OHOS::android::hardware::Return<::OHOS::android::hardware::graphics::mapper::V4_0::Error>  _hidl_set(::OHOS::android::hardware::IInterface* _hidl_this, ::OHOS::android::hardware::details::HidlInstrumentor *_hidl_this_instrumentor, void* buffer, const ::OHOS::android::hardware::graphics::mapper::V4_0::IMapper::MetadataType& metadataType, const ::OHOS::android::hardware::hidl_vec<uint8_t>& metadata);
    static ::OHOS::android::hardware::Return<void>  _hidl_getFromBufferDescriptorInfo(::OHOS::android::hardware::IInterface* _hidl_this, ::OHOS::android::hardware::details::HidlInstrumentor *_hidl_this_instrumentor, const ::OHOS::android::hardware::graphics::mapper::V4_0::IMapper::BufferDescriptorInfo& description, const ::OHOS::android::hardware::graphics::mapper::V4_0::IMapper::MetadataType& metadataType, getFromBufferDescriptorInfo_cb _hidl_cb);
    static ::OHOS::android::hardware::Return<void>  _hidl_listSupportedMetadataTypes(::OHOS::android::hardware::IInterface* _hidl_this, ::OHOS::android::hardware::details::HidlInstrumentor *_hidl_this_instrumentor, listSupportedMetadataTypes_cb _hidl_cb);
    static ::OHOS::android::hardware::Return<void>  _hidl_dumpBuffer(::OHOS::android::hardware::IInterface* _hidl_this, ::OHOS::android::hardware::details::HidlInstrumentor *_hidl_this_instrumentor, void* buffer, dumpBuffer_cb _hidl_cb);
    static ::OHOS::android::hardware::Return<void>  _hidl_dumpBuffers(::OHOS::android::hardware::IInterface* _hidl_this, ::OHOS::android::hardware::details::HidlInstrumentor *_hidl_this_instrumentor, dumpBuffers_cb _hidl_cb);
    static ::OHOS::android::hardware::Return<void>  _hidl_getReservedRegion(::OHOS::android::hardware::IInterface* _hidl_this, ::OHOS::android::hardware::details::HidlInstrumentor *_hidl_this_instrumentor, void* buffer, getReservedRegion_cb _hidl_cb);

    // Methods from ::OHOS::android::hardware::graphics::mapper::V4_0::IMapper follow.
    ::OHOS::android::hardware::Return<void> createDescriptor(const ::OHOS::android::hardware::graphics::mapper::V4_0::IMapper::BufferDescriptorInfo& description, createDescriptor_cb _hidl_cb) override;
    ::OHOS::android::hardware::Return<void> importBuffer(const ::OHOS::android::hardware::hidl_handle& rawHandle, importBuffer_cb _hidl_cb) override;
    ::OHOS::android::hardware::Return<::OHOS::android::hardware::graphics::mapper::V4_0::Error> freeBuffer(void* buffer) override;
    ::OHOS::android::hardware::Return<::OHOS::android::hardware::graphics::mapper::V4_0::Error> validateBufferSize(void* buffer, const ::OHOS::android::hardware::graphics::mapper::V4_0::IMapper::BufferDescriptorInfo& description, uint32_t stride) override;
    ::OHOS::android::hardware::Return<void> getTransportSize(void* buffer, getTransportSize_cb _hidl_cb) override;
    ::OHOS::android::hardware::Return<void> lock(void* buffer, uint64_t cpuUsage, const ::OHOS::android::hardware::graphics::mapper::V4_0::IMapper::Rect& accessRegion, const ::OHOS::android::hardware::hidl_handle& acquireFence, lock_cb _hidl_cb) override;
    ::OHOS::android::hardware::Return<void> unlock(void* buffer, unlock_cb _hidl_cb) override;
    ::OHOS::android::hardware::Return<void> flushLockedBuffer(void* buffer, flushLockedBuffer_cb _hidl_cb) override;
    ::OHOS::android::hardware::Return<::OHOS::android::hardware::graphics::mapper::V4_0::Error> rereadLockedBuffer(void* buffer) override;
    ::OHOS::android::hardware::Return<void> isSupported(const ::OHOS::android::hardware::graphics::mapper::V4_0::IMapper::BufferDescriptorInfo& description, isSupported_cb _hidl_cb) override;
    ::OHOS::android::hardware::Return<void> get(void* buffer, const ::OHOS::android::hardware::graphics::mapper::V4_0::IMapper::MetadataType& metadataType, get_cb _hidl_cb) override;
    ::OHOS::android::hardware::Return<::OHOS::android::hardware::graphics::mapper::V4_0::Error> set(void* buffer, const ::OHOS::android::hardware::graphics::mapper::V4_0::IMapper::MetadataType& metadataType, const ::OHOS::android::hardware::hidl_vec<uint8_t>& metadata) override;
    ::OHOS::android::hardware::Return<void> getFromBufferDescriptorInfo(const ::OHOS::android::hardware::graphics::mapper::V4_0::IMapper::BufferDescriptorInfo& description, const ::OHOS::android::hardware::graphics::mapper::V4_0::IMapper::MetadataType& metadataType, getFromBufferDescriptorInfo_cb _hidl_cb) override;
    ::OHOS::android::hardware::Return<void> listSupportedMetadataTypes(listSupportedMetadataTypes_cb _hidl_cb) override;
    ::OHOS::android::hardware::Return<void> dumpBuffer(void* buffer, dumpBuffer_cb _hidl_cb) override;
    ::OHOS::android::hardware::Return<void> dumpBuffers(dumpBuffers_cb _hidl_cb) override;
    ::OHOS::android::hardware::Return<void> getReservedRegion(void* buffer, getReservedRegion_cb _hidl_cb) override;

    // Methods from ::OHOS::android::hidl::base::V1_0::IBase follow.
    ::OHOS::android::hardware::Return<void> interfaceChain(interfaceChain_cb _hidl_cb) override;
    ::OHOS::android::hardware::Return<void> debug(const ::OHOS::android::hardware::hidl_handle& fd, const ::OHOS::android::hardware::hidl_vec<::OHOS::android::hardware::hidl_string>& options) override;
    ::OHOS::android::hardware::Return<void> interfaceDescriptor(interfaceDescriptor_cb _hidl_cb) override;
    ::OHOS::android::hardware::Return<void> getHashChain(getHashChain_cb _hidl_cb) override;
    ::OHOS::android::hardware::Return<void> setHALInstrumentation() override;
    ::OHOS::android::hardware::Return<bool> linkToDeath(const ::OHOS::android::sp<::OHOS::android::hardware::hidl_death_recipient>& recipient, uint64_t cookie) override;
    ::OHOS::android::hardware::Return<void> ping() override;
    ::OHOS::android::hardware::Return<void> getDebugInfo(getDebugInfo_cb _hidl_cb) override;
    ::OHOS::android::hardware::Return<void> notifySyspropsChanged() override;
    ::OHOS::android::hardware::Return<bool> unlinkToDeath(const ::OHOS::android::sp<::OHOS::android::hardware::hidl_death_recipient>& recipient) override;

private:
    std::mutex _hidl_mMutex;
    std::vector<::OHOS::android::sp<::OHOS::android::hardware::hidl_binder_death_recipient>> _hidl_mDeathRecipients;
};

}  // namespace V4_0
}  // namespace mapper
}  // namespace graphics
}  // namespace hardware
}  // namespace android
}

#endif  // HIDL_GENERATED_ANDROID_HARDWARE_GRAPHICS_MAPPER_V4_0_BPHWMAPPER_H
